In communication applications, every device in a network may have its own internal clock running independently from other devices in the network. Without a unified and accurate time standard, devices in the network may be uncoordinated.
Network time protocol (NTP) is a networking protocol designed to synchronize clocks of computers to one or more time references. NTP is intended to synchronize participating computers to within a few milliseconds of coordinated universal time (UTC). NTP networks are software-based, and timestamp requests may have to wait for a local operating system.
Precision time protocol (PTP) is another network-based protocol that is used to synchronize clocks in a distributed system. PTP uses hardware timestamping instead of software timestamping. Every PTP sequence involves a series of four messages between master and slave, and four different timestamps are produced during this sequence.